Skip to content

[WLM] Rename queryGroup to workloadGroup#17901

Merged
jainankitk merged 5 commits intoopensearch-project:mainfrom
kaushalmahi12:wlm/renaming_query_group
Apr 11, 2025
Merged

[WLM] Rename queryGroup to workloadGroup#17901
jainankitk merged 5 commits intoopensearch-project:mainfrom
kaushalmahi12:wlm/renaming_query_group

Conversation

@kaushalmahi12
Copy link
Copy Markdown
Contributor

@kaushalmahi12 kaushalmahi12 commented Apr 11, 2025

Description

This change is to rename the QueryGroup name to WorkloadGroup. Since QueryGroup name is becoming little bit misleading given other features such as query insights, cluster insights etc.

This change should not break over the wire ser/de because we are not changing underlying fields or their types. Regarding stats also we are not changing any field or their type but just the toXContent() output and this is a one way operation triggered by _/wlm/stats API.

Few things that I am still considering is the cluster state metadata

  • Whether in a mixed cluster setup, state publication can break or not ?

It should not break because the diff is calculated on the keys of WorkloadGroupMetadata.

  • It can break during restore from remote or local backup of state metadata ?

I think the solution to this is to register the metadata type with two names in NamedXContentRegistry in ClusterModule i,e; previous one and the updated one. Or alternate is that we don't change the Custom Metadata type value.

this method is responsible for registering the NameXContentWritables which are later used to parse the custom metadata objects from the persisted state.

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 618284d: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for 6244dd8: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e40c692: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@kaushalmahi12
Copy link
Copy Markdown
Contributor Author

kaushalmahi12 commented Apr 11, 2025

@shwetathareja @backslasht Can you verify the metadata part on this PR ?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e40c692: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

❌ Gradle check result for e40c692: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Copy Markdown
Contributor

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kaushalmahi12 for this PR. Let us not edit release notes for old versions, otherwise mostly looks good!

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for 0f570a0: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 88 lines in your changes missing coverage. Please review.

Project coverage is 72.41%. Comparing base (1628152) to head (0f570a0).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
.../java/org/opensearch/wlm/WorkloadGroupService.java 75.71% 7 Missing and 10 partials ⚠️
...ellation/WorkloadGroupTaskCancellationService.java 92.72% 5 Missing and 3 partials ⚠️
...plugin/wlm/rest/RestCreateWorkloadGroupAction.java 0.00% 6 Missing ⚠️
...plugin/wlm/rest/RestUpdateWorkloadGroupAction.java 0.00% 6 Missing ⚠️
...org/opensearch/cluster/metadata/WorkloadGroup.java 83.33% 4 Missing and 2 partials ⚠️
...ch/plugin/wlm/rest/RestGetWorkloadGroupAction.java 0.00% 5 Missing ⚠️
...wlm/action/TransportCreateWorkloadGroupAction.java 0.00% 4 Missing ⚠️
...wlm/action/TransportUpdateWorkloadGroupAction.java 0.00% 4 Missing ⚠️
.../plugin/wlm/action/UpdateWorkloadGroupRequest.java 73.33% 4 Missing ⚠️
...n/wlm/service/WorkloadGroupPersistenceService.java 93.61% 2 Missing and 1 partial ⚠️
... and 17 more
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17901      +/-   ##
============================================
- Coverage     72.43%   72.41%   -0.03%     
- Complexity    66789    66790       +1     
============================================
  Files          5449     5451       +2     
  Lines        309085   309156      +71     
  Branches      44979    44988       +9     
============================================
- Hits         223899   223867      -32     
- Misses        66906    66999      +93     
- Partials      18280    18290      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jainankitk jainankitk merged commit df3e645 into opensearch-project:main Apr 11, 2025
32 checks passed
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Apr 15, 2025
* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix propagated headers

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add changelog entry

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* resolve comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Sriram Ganesh <srignsh22@gmail.com>
Harsh-87 pushed a commit to Harsh-87/OpenSearch that referenced this pull request May 7, 2025
* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix propagated headers

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add changelog entry

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* resolve comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Harsh Kothari <techarsh@amazon.com>
Harsh-87 pushed a commit to Harsh-87/OpenSearch that referenced this pull request May 7, 2025
* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix propagated headers

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add changelog entry

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* resolve comments

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Harsh Kothari <techarsh@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants